package ${basePackageName}.interfaces.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Date;

/**
 * description 表(${tableName})的返回视图VO对象
 *
 * @author ${authorName}
 * @date ${dateTime}
 */
@ApiModel("${tableClassNamePrefix}VO")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ${tableClassNamePrefix}VO {

<#list tableColumns as column>
    /**
     * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
     */
    @ApiModelProperty("${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}")
    <#if column.dataType == 'int' || column.dataType == 'tinyint' || column.dataType == 'smallint' || column.dataType == 'mediumint' || column.dataType == 'bit'>
        <#if column.propName != 'id'>
    private Integer ${column.propName};
        <#else>
    private String ${column.propName};
        </#if>
    <#elseif column.dataType == 'bigint'>
        <#if column.propName != 'id'>
    private Long ${column.propName};
        <#else>
    private String ${column.propName};
        </#if>
    <#elseif column.dataType == 'float' || column.dataType == 'double'>
    private Double ${column.propName};
    <#elseif column.dataType == 'date' || column.dataType == 'datetime' || column.dataType == 'time' || column.dataType == 'timestamp'>
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date ${column.propName};
    <#elseif column.dataType == 'BigDecimal'>
    private BigDecimal ${column.propName};
    <#else>
    private String ${column.propName};
    </#if>

</#list>
}
